use "Manuscript data for PLOS ONE.dta", clear
//decentralization
 bys year :egen lev_ave=mean(lev_iper)
 bys year :egen Gini_ave=mean(Gini)
 xtset fid10 year
 gen lev_m=lev_iper-lev_ave
 gen Gini_m=Gini-Gini_ave
 xtset fid10 year, delta(2)
 gen lev_2m=l.lev_m
//Export description statistics results
sum lnexp_iper Gini lev_2 lninc_iper lnasset_iper gender age agesq eduy married health pop labor, sep(10)
//correlation matrix results
net install asdoc, from(http://fintechprofessor.com) replace
asdoc pwcorr lnexp_iper Gini lev_2 lninc_iper lnasset_iper gender age agesq eduy married health pop labor, star(all) replace 
//Multicollinearity test results
newey2 lnexp_iper Gini lev_2 lninc_iper lnasset_iper gender age agesq eduy married health pop labor, lag(2)
neweyvif
//（VIF=8.95<10，there is no Multicollinearity）


//robust FE controlled time and province, but no asset and income
xtreg lnexp_iper Gini lev_2 gender age agesq eduy married health pop labor i.year, fe r
est store FE_robust1
xtreg lnexp_iper Gini lev_2 c.Gini_m#c.lev_2m gender age agesq eduy married health pop labor i.year, fe r
est store FE_robust11
//robust FE controlled province but not controlled time
xtreg lnexp_iper Gini lev_2 lninc_iper lnasset_iper gender age agesq eduy married health pop labor, fe r
est store FE_robust2
xtreg lnexp_iper Gini lev_2 c.Gini_m#c.lev_2m lninc_iper lnasset_iper gender age agesq eduy married health pop labor , fe r
est store FE_robust22
//robust FE controlled both time and province
xtreg lnexp_iper Gini lev_2 lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year, fe r
est store FE_TW1
xtreg lnexp_iper Gini lev_2 c.Gini_m#c.lev_2m lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year, fe r
est store FE_TW2
//deduced results
esttab FE_robust1 FE_robust11 FE_robust2 FE_robust22 FE_TW1 FE_TW2, star(* 0.1 ** 0.05 *** 0.01) b se mtitle


 //Discussion by Region
 //Eastern region
xtreg lnexp_iper Gini lev_2 lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year if region3==0, fe r
est store dongbu1
xtreg lnexp_iper Gini lev_2 c.Gini_m#c.lev_2m lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year if region3==0, fe r
est store dongbu2
 //Middle region
 xtreg lnexp_iper Gini lev_2 lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year if region3==1, fe r
 est store zhongbu1
 xtreg lnexp_iper Gini lev_2 c.Gini_m#c.lev_2m lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year if region3==1, fe r
 est store zhongbu2
 //Western region
 xtreg lnexp_iper Gini lev_2 lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year if region3==2, fe r
 est store xibu1
 xtreg lnexp_iper Gini lev_2 c.Gini_m#c.lev_2m lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year if region3==2, fe r
 est store xibu2
//deduced results
esttab dongbu1 dongbu2 zhongbu1 zhongbu2 xibu1 xibu2, star(* 0.1 ** 0.05 *** 0.01) b se mtitle


//Urban region
 xtreg lnexp_iper Gini lev_2 lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year if urban==1, fe r
 est store urban1
 xtreg lnexp_iper Gini lev_2 c.Gini_m#c.lev_2m lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year if urban==1, fe r
  est store urban2
 //Rural region
  xtreg lnexp_iper Gini lev_2 lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year if urban==0, fe r
  est store country1
 xtreg lnexp_iper Gini lev_2 c.Gini_m#c.lev_2m lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year if urban==0, fe r
  est store country2
//deduced results
esttab urban1 urban2 country1 country2, star(* 0.1 ** 0.05 *** 0.01) b se mtitle


//Theil index and MLD
//Theil index decentralization
 bys year :egen Theil_ave=mean(Theil)
 xtset fid10 year
 gen Theil_m=Theil-Theil_ave
 xtset fid10 year, delta(2)
//robust FE controlled time and province, but no asset and income
xtreg lnexp_iper lev_2 Theil gender age agesq eduy married health pop labor i.year, fe r
est store FE_robust3
xtreg lnexp_iper lev_2 Theil c.Theil_m#c.lev_2m gender age agesq eduy married health pop labor i.year, fe r
est store FE_robust33
//robust FE controlled province but not controlled time
xtreg lnexp_iper lev_2 Theil lninc_iper lnasset_iper gender age agesq eduy married health pop labor, fe r
est store FE_robust4
xtreg lnexp_iper lev_2 Theil c.Theil_m#c.lev_2m lninc_iper lnasset_iper gender age agesq eduy married health pop labor , fe r
est store FE_robust44
//robust FE controlled both time and province
xtreg lnexp_iper lev_2 Theil lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year, fe r
est store FE_TW11
xtreg lnexp_iper lev_2 Theil c.Theil_m#c.lev_2m lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year, fe r
est store FE_TW21
//deduced results
esttab FE_robust3 FE_robust33 FE_robust4 FE_robust44 FE_TW11 FE_TW21, star(* 0.1 ** 0.05 *** 0.01) b se mtitle


//MLD index decentralization
 bys year :egen MLD_ave=mean(MLD)
 xtset fid10 year
 gen MLD_m=MLD-MLD_ave
 xtset fid10 year, delta(2)
//robust FE controlled time and province, but no asset and income
xtreg lnexp_iper lev_2 MLD gender age agesq eduy married health pop labor i.year, fe r
est store FE_robust5
xtreg lnexp_iper lev_2 MLD c.MLD_m#c.lev_2m gender age agesq eduy married health pop labor i.year, fe r
est store FE_robust55
//robust FE controlled province but not controlled time
xtreg lnexp_iper lev_2 MLD lninc_iper lnasset_iper gender age agesq eduy married health pop labor, fe r
est store FE_robust6
xtreg lnexp_iper lev_2 MLD c.MLD_m#c.lev_2m lninc_iper lnasset_iper gender age agesq eduy married health pop labor , fe r
est store FE_robust66
//robust FE controlled both time and province
xtreg lnexp_iper lev_2 MLD lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year, fe r
est store FE_TW12
xtreg lnexp_iper lev_2 MLD c.MLD_m#c.lev_2m lninc_iper lnasset_iper gender age agesq eduy married health pop labor i.year, fe r
est store FE_TW22
//deduced results
esttab FE_robust5 FE_robust55 FE_robust6 FE_robust66 FE_TW12 FE_TW22, star(* 0.1 ** 0.05 *** 0.01) b se mtitle






